import java.util.Scanner;

public class demo02 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入你的工资：");
        double i=sc.nextInt();
        System.out.println("请输入你的住房贷款：");
        double d=sc.nextInt();
        System.out.println("请输入你的其他税前扣除：");
        double j=sc.nextInt();

        double sum = i-5000-d-j;

        if (sum<=0){
            System.out.println("你不需要交税！");
        }else if (sum<=3000) {
            System.out.println("你需要交的税为：" + sum * 0.03);
        }else if (sum>3000&&sum<=12000) {
            System.out.println("你需要交的税为：" +( sum * 0.1-210));
        }else if (sum>12000&&sum<=25000) {
            System.out.println("你需要交的税为：" +( sum * 0.2-1410));
        }else if (sum>25000&&sum<=35000) {
            System.out.println("你需要交的税为：" +( sum * 0.25-2660));
        }else if (sum>35000&&sum<=55000) {
            System.out.println("你需要交的税为：" +( sum * 0.3-4410));
        }else if (sum>55000&&sum<=80000) {
            System.out.println("你需要交的税为：" +( sum * 0.35-7160));
        }else if (sum>80000) {
            System.out.println("你需要交的税为：" +( sum * 0.45-15160));
        }
    }
}
